<?php
namespace Amis\dataviewer;

use Amis\Basics\AmisBasics;

class Calendar extends AmisBasics
{
    public string $type = 'calendar';

    /**
     * 日历中展示日程，可设置静态数据或从上下文中取数据，startTime 和 endTime 格式参考文档，className 参考背景色
     * Array<{startTime: string, endTime: string, content: any, className?: string}> | string
     * @param array $schedules
     * @return $this
     */
    public function schedules(array $schedules)
    {
        $this->schedules = $schedules;
        return $this;
    }

    /**
     * 日历中展示日程的颜色，参考背景色
     * ['bg-warning', 'bg-danger', 'bg-success', 'bg-info', 'bg-secondary']
     * @param array $scheduleClassNames
     * @return $this
     */
    public function scheduleClassNames(array $scheduleClassNames = ['bg-warning', 'bg-danger', 'bg-success', 'bg-info', 'bg-secondary'])
    {
        $this->scheduleClassNames = $scheduleClassNames;
        return $this;
    }

    /**
     * 自定义日程展示
     * @param array $scheduleAction
     * @return $this
     */
    public function scheduleAction(array $scheduleAction)
    {
        $this->scheduleAction = $scheduleAction;
        return $this;
    }

    /**
     * 放大模式
     * @param bool $largeMode
     * @return $this
     */
    public function largeMode(bool $largeMode = false)
    {
        $this->largeMode = $largeMode;
        return $this;
    }
}